package com.code.refactoring.重构demo.状态机扭转.stateProcessor;

/**
 * @author wangxi03 created on 2021/4/29 10:29 上午
 * @version v1.0
 */

import com.code.refactoring.重构demo.状态机扭转.entity.ServiceResult;
import com.code.refactoring.重构demo.状态机扭转.entity.StateContext;

/**
 * 状态机处理器接口
 */
public interface StateProcessor<T, C> {
    /**
     * 执行状态迁移的入口
     */
    ServiceResult<T> action(StateContext<C> context) throws Exception;
}
